package com.bw.suppliers.controller;

import com.bw.common.core.domain.Result;
import com.bw.suppliers.pojo.Suppliers;
import com.bw.suppliers.service.SuppliersService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("suppliers")
public class SuppliersController {

    @Autowired
    private SuppliersService suppliersService;

    /**
     * 供应商下拉框
     * @return
     */
    @GetMapping("list")
    public Result supplierList(){
        List<Suppliers> list = suppliersService.supplierList();
        return Result.success(list);
    }
}
